﻿@using Microsoft.AspNet.Identity

<div id="topNav">
    <div class="block clearfix">
        <script>
            function AddFavorite(title, url) {
                try {
                    window.external.addFavorite(url, title);
                }
                catch (e) {
                    try {
                        window.sidebar.addPanel(title, url, "");
                    }
                    catch (e) {
                        alert("抱歉，您所使用的浏览器无法完成此操作。\n\n加入收藏失败，请使用Ctrl+D进行添加");
                    }
                }
            }
        </script>

        @if (Request.IsAuthenticated)
        {
            var userInfo = new UserHelp().TryGetUserInfo();
            <div id="LoginIn">
                <div class="topNav1">
                    <font id="ECS_MEMBERZONE">
                        <div id="append_parent"></div>
                        @Html.ActionLink( userInfo.RealName ?? userInfo.LoginID, "Index", new { controller = "UserCenter", area = "Web" })
                        @Html.ActionLink("注销", "LogOff", new { controller = "Customer", area = "Web" })
                    </font>
                </div>
                <span class="f_l top_ico top_ico2" id="ECS_CARTINFO"><a href="/ShopCart/Index" title="查看购物车" target="_blank">我的购物车</a></span>
            </div>
        }
        else
        {
            <div id="LoginIn">
                <div class="topNav1">
                    <font id="ECS_MEMBERZONE">
                        <div id="append_parent"></div>
                     
                        @Html.ActionLink("登录", "UserLogin", new { controller = "Customer", area = "Web" })
                        @Html.ActionLink("注册", "UserReg", new { controller = "Customer", area = "Web" })
                    </font>
                </div>              
            </div>
        }

        <span class="j"></span>
        <a class="top_ico top_ico1" href="javascript:void(0);" onclick="AddFavorite('果蔬汇（www.baidu.com） 果蔬汇选购第一站',location.href)">收藏果蔬汇</a>
        <span class="j"></span>

        <div class="div" onmouseover="this.className='div div_on'" onmouseout="this.className='div'">
            <a class="top_ico top_ico3" href="/download/">手机果蔬汇</a><i></i>
            <div class="top_app">
                <div class="dang dang1"></div>
                <div class="app_pic">
                </div>
                <div class="txt">
                    <p>扫描我，即刻下载</p>
                    <b>果蔬汇手机客户端</b>
                </div>
                <div class="blank"></div>
                <div class="bnt clearfix">
                    <a class="a2" rel="nofollow" href="http://www.baidu.com/app/guoshuhui.apk" target="_blank" title="安卓下载">安卓下载</a>
                </div>
            </div>
        </div>

        <div class="div" onmouseover="this.className='div div_on'" onmouseout="this.className='div'">
            <a href="/HelpCenter" target="_blank">帮助中心 </a><i></i>
        </div>

        <div class="div" onmouseover="this.className='div div_on'" onmouseout="this.className='div'">
            <a href="/VendorApply/Index/" target="_blank">合作代理</a><i></i>
        </div>

        <span class="j"></span>
    </div>
</div>
